package cn.edu.neusoft.mall.controller;

import cn.edu.neusoft.framework.annotations.Controller;
import cn.edu.neusoft.framework.annotations.RequestMapping;
import cn.edu.neusoft.framework.model.ModelAndView;
import cn.edu.neusoft.mall.service.adminService;
import cn.edu.neusoft.mall.service.impl.adminServiceimpl;

@Controller
public class adminController {
    adminService adminservice=new adminServiceimpl();
    @RequestMapping("/admin")
    public ModelAndView admin(){
        ModelAndView mv = new ModelAndView("admin/contion");
        return mv;
    }
    @RequestMapping("/useradmin")
    public ModelAndView useradmin(){
        ModelAndView mv = new ModelAndView("admin/useradmin");
        mv.addObject("userList",adminservice.getUserListS());
        return mv;
    }
    @RequestMapping("/subadmin")
    public ModelAndView subadmin(){
        ModelAndView mv = new ModelAndView("admin/subadmin");
        mv.addObject("dogsSub",adminservice.getdogSubscribeListS());
        mv.addObject("catsSub",adminservice.getcatSubscribeListS());
        return mv;
    }
}
